﻿#ifndef CODEBROWSER_H
#define CODEBROWSER_H

#include <QTextBrowser>

class CodeBrowser : public QTextBrowser
{
    Q_OBJECT
public:
    explicit CodeBrowser(QWidget *parent = nullptr);

    void setCode(const QString &text);
    QString code() const;
    void setStep(const int step);
    int step() const;
    int stepCount() const;
    void setStepCount(const int count);

signals:
    void loadFinished();
    void stepChanged(int step);

private:
    int m_step;
    int m_stepCount;
};

#endif // CODEBROWSER_H
